Making Type Inference Practical
نویسندگان
چکیده
We present the implementation of a type inference algorithm for untyped object-oriented programs with inheritance, assignments, and late binding. The algorithm signiicantly improves our previous one, presented at OOPSLA'91, since it can handle collection classes, such as List, in a useful way. Also, the complexity has been dramatically improved, from exponential time to low polynomial time. The implementation uses the techniques of incremental graph construction and constraint template instantiation to avoid representing intermediate results, doing superruous work, and recomputing type information. Experiments indicate that the implementation type checks as much as 100 lines pr. second. This results in a mature product, on which a number of tools can be based, for example a safety tool, an image compression tool, a code optimization tool, and an annotation tool. This may make type inference for object-oriented languages practical.
منابع مشابه
An Introduction to Inference and Learning in Bayesian Networks
Bayesian networks (BNs) are modern tools for modeling phenomena in dynamic and static systems and are used in different subjects such as disease diagnosis, weather forecasting, decision making and clustering. A BN is a graphical-probabilistic model which represents causal relations among random variables and consists of a directed acyclic graph and a set of conditional probabilities. Structure...
متن کاملMagnitude-based inference and its application in user research
Magnitude-based inference offers a theoretically justified and practically useful approach in any behavioural research that involves statistical inference. This approach supports two important types of inference: mechanistic inference and practical inference to support real-world decision-making. Therefore, this approach is especially suitable for user research. We present basic elements of mag...
متن کاملA Practical Inference Engine for Risk Assessment of Power Systems based on Hybrid Fuzzy Influence Diagrams
Risk became the crucial decision making criteria in evaluation of some control actions in power systems, but very often, these decisions are made in a highly uncertain environment. In this paper, a new graphical tool for risk assessment and decision making under uncertainty – hybrid influence diagram with fuzzy probability values and fuzzy random variables is proposed. Influence diagram is a ge...
متن کاملA Prioritization Model for HSE Risk Assessment Using Combined Failure Mode, Effect Analysis, and Fuzzy Inference System: A Case Study in Iranian Construction Industry
The unavailability of sufficient data and uncertainty in modeling, some techniques, and decision-making processes play a significant role in many engineering and management problems. Attain to sure solutions for a problem under accurate consideration is essential. In this paper, an application of fuzzy inference system for modeling the indeterminacy involved in the problem of HSE risk assessm...
متن کاملDeveloping a fuzzy inference system to devise proper business strategies: a study on carpet industry
The present article formulates the scenarios that the organization will be probably facing with, using the uncertain factors in business environment, and it also selects the most robust strategies of organization for dealing with the formulated scenarios using the fuzzy information expressed by the experts in fuzzy inference system. The present article aims to provide a method enabling the scen...
متن کامل